package cn.itcast.ssm.Service;

import cn.itcast.ssm.Domain.word;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;


public interface wordService {
    @Insert("insert into tb_word (DATE,TEXT) values (#{date},#{text})")
    int insertWord(word word);

    @Select("select * from tb_word order by tb_word.date DESC ")
    List<word> getwords();

}
